
kmpkg_from_gitee(
        OUT_SOURCE_PATH SOURCE_PATH
        REPO kumo-pub/kthread
        REF "v${VERSION}"
        SHA512 32540993102aacda8d3f7f94c22ea4eb74061500324e4cb5313d47906330bf366c8edd7a17162a1a558d5dd268b07a01e1ba4c8bc8379ca07435e0f15971fa3b
        HEAD_REF master
)

kmpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    DISABLE_PARALLEL_CONFIGURE
    OPTIONS
        -DKMCMAKE_BUILD_TEST=OFF
)

kmpkg_cmake_install()
kmpkg_cmake_config_fixup(PACKAGE_NAME kthread CONFIG_PATH lib/cmake/kthread)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
kmpkg_copy_pdbs()

kmpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

kmpkg_fixup_pkgconfig()
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
